package interview.huawei.training.p29;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int lineNumber = 0;
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            String str = scanner.nextLine();
            lineNumber++;
            char[] chArray = str.toCharArray();
            for(int i = 0; i < chArray.length; i++) {
                // 加密
                if(lineNumber % 2 == 1) {
                    if(chArray[i] >= 'a' && chArray[i] <= 'z') {
                        chArray[i] += 1;
                        if(chArray[i] > 'z')
                            chArray[i] = 'A';
                        else
                            chArray[i] = Character.toUpperCase(chArray[i]);
                    }
                    else if(chArray[i] >= 'A' && chArray[i] <= 'Z') {
                        chArray[i] += 1;
                        if(chArray[i] > 'Z')
                            chArray[i] = 'a';
                        else
                            chArray[i] = Character.toLowerCase(chArray[i]);
                    }
                    else if(chArray[i] >= '0' && chArray[i] <= '9') {
                        chArray[i] += 1;
                        if(chArray[i] > '9')
                            chArray[i] = '0';
                    }
                }
                // 解密
                else {
                    if(chArray[i] >= 'a' && chArray[i] <= 'z') {
                        chArray[i] -= 1;
                        if(chArray[i] < 'a')
                            chArray[i] = 'Z';
                        else
                            chArray[i] = Character.toUpperCase(chArray[i]);
                    }
                    else if(chArray[i] >= 'A' && chArray[i] <= 'Z') {
                        chArray[i] -= 1;
                        if(chArray[i] < 'A')
                            chArray[i] = 'z';
                        else
                            chArray[i] = Character.toLowerCase(chArray[i]);
                    }
                    else if(chArray[i] >= '0' && chArray[i] <= '9') {
                        chArray[i] -= 1;
                        if(chArray[i] < '0')
                            chArray[i] = '9';
                    }
                }

            }
            System.out.println(new String(chArray));
        }
    }
}